<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>统计商品订单列表</title>

    <#include "/view/admin/headList.html"/>

</head>
<body>
<div class="table-class">
    <div class="panel panel-default" style="margin: 10px 10px 10px;">
        <div class="panel-body">
            <form class="bs-example bs-example-form" role="form">

                <div class="input-group">
                    <span class="input-group-addon">商品名称</span>
                    <input type="text" id="commodityName" class="form-control" value="${commodityName!}" placeholder="请输入商品名称">
                </div>
                <span class="bank-label">&nbsp;</span>

                <div class="input-group">
                    <span class="input-group-addon">订单状态</span>
                    <select id="orderType" name="orderType" class="form-control" >
                        <option value="">请选择订单状态</option>
                        <option value="0" <#if orderType??&&0 == orderType>selected="selected"</#if>>待支付</option>
                        <option value="7" <#if orderType??&&7 == orderType>selected="selected"</#if>>待收货</option>
                        <option value="8" <#if orderType??&&8 == orderType>selected="selected"</#if>>已完成</option>
                        <option value="10" <#if orderType??&&10 == orderType>selected="selected"</#if>>等待退款</option>
                        <option value="13" <#if orderType??&&13 == orderType>selected="selected"</#if>>待发货</option>
                        <option value="16" <#if orderType??&&16 == orderType>selected="selected"</#if>>等待退款</option>
                        <option value="17" <#if orderType??&&17 == orderType>selected="selected"</#if>>订单已取消</option>
                        <option value="18" <#if orderType??&&18 == orderType>selected="selected"</#if>>退货退款成功</option>

                    </select>

                </div>
                <span class="bank-label">&nbsp;</span>




        <div class="input-group">
            <span class="input-group-addon">开始创建时间</span>
            <input type="text" id="createtimeStart" class="form-control isdatetimepicker" value="<#if (createtimeStart)?? >${createtimeStart?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="createtimeStart" name="createtimeStart" data-date-format="yyyy-mm-dd hh:ii:ss">
        </div>
        <span class="bank-label">&nbsp;</span>
        <div class="input-group">
            <span class="input-group-addon">结束创建时间</span>
            <input type="text" id="createtimeEnd" class="form-control isdatetimepicker" value="<#if (createtimeEnd)?? >${ createtimeEnd?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="createtimeEnd" name="createtimeEnd" data-date-format="yyyy-mm-dd hh:ii:ss">
        </div>
        <span class="bank-label">&nbsp;</span>



        <div class="input-group" style="text-align: right;">
            <a class="btn btn-info"  href="javascript:query('${base}/czjstatistical/commoditylist.do')"><span class="glyphicon glyphicon-search"></span> 查找</a>

        </div>
        </form>
    </div>
</div>



    <div>查询结果的总金额：<span style="color: red;">${totalAmount?default(0)}</span></div>
<table class="table table-hover table-list table-bordered" >
    <thead>

    <tr class="table-head">
        <th style="width: 30px;">序号</th>
        <th>商品名称</th>
        <th>订单状态</th>
        <th>数量</th>
        <th>金额</th>

    </tr>
    </thead>
    <tbody>
    <#list pagination.list as c>
        <tr>
            <td >${(pagination.pageNo-1)*pagination.pageSize+1+c_index}</td>
            <td >${c.commodityName!}</td>
            <td >${c.orderStatusName!}</td>
            <td >${c.num?default(0)}</td>
            <td >${c.totalAmount?default(0)}</td>
        </tr>
    </#list>
    </tbody>
</table>



</div>
<script>

    function queryCondition(){
        var href = "";
        href+='createtimeStart='+$('#createtimeStart').val()+'&';
        href+='createtimeEnd='+$('#createtimeEnd').val()+'&';
        href+='commodityName='+$('#commodityName').val()+'&';
        href+='orderType='+$('#orderType').val();

        return href;
    }

</script>

</body>
</html>
